Page({
    data:{
        list:[],
        item:{}
    },
    onLoad(){
        wx.cloud.callFunction({
            name:'getdynamicall'
        }).then(res=>{
            console.log(res.result.data)
            this.setData({
                list:res.result.data
            })
        })
    },
    goDetail(e){
        var that=this
        console.log(e)
        const {item}=e.currentTarget.dataset
        that.setData({
            item:item
        })
        let newitem=JSON.stringify(that.data.item)
        console.log(newitem)
        wx.navigateTo({
          url: '/pages/dynamic_item/index?item='+encodeURIComponent(newitem),
        })
    }
})